export default defineAppConfig({
  entryPagePath: "pages/index/index",
  pages: ["pages/index/index", "pages/list/index", "pages/profile/index"],
  subPackages: [
    {
      root: "sub_common",
      pages: [
        "pages/auth/index",
        "pages/auth/login/index",
        "pages/auth/wechat/index",
        "pages/auth/wechat-mini-program/index",
      ],
    },
    {
      root: "sub_independent",
      pages: ["pages/tailwindcss/index"],
      independent: true,
    },
  ],
  preloadRule: {
    "pages/index/index": {
      packages: ["sub_common"],
      network: "all",
    },
  },
  window: {
    backgroundTextStyle: "light",
    navigationBarBackgroundColor: "#fff",
    navigationBarTitleText: "WeChat",
    navigationBarTextStyle: "black",
  },
  tabBar: {
    list: [
      {
        pagePath: "pages/index/index",
        text: "主页",
        iconPath: "./assets/img/tabbar/1.png",
        selectedIconPath: "./assets/img/tabbar/1_a.png",
      },
      {
        pagePath: "pages/list/index",
        text: "商品",
        iconPath: "./assets/img/tabbar/2.png",
        selectedIconPath: "./assets/img/tabbar/2_a.png",
      },
      {
        pagePath: "pages/profile/index",
        text: "我的",
        iconPath: "./assets/img/tabbar/3.png",
        selectedIconPath: "./assets/img/tabbar/3_a.png",
      },
    ],
  },
});
